<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="${movie.name},${movie.byname}" />
	<meta name="description" content="${movie.summary}" />
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" language="javascript" src="/js/jquery-1.6.1.min.js"></script>
	<script type="text/javascript" language="javascript" src="/js/tool.js"></script>
	<title>${movie.name} - 琥珀川 · 高清影视网</title>
	<style type="text/css">
		<%--选项Font--%>
		.optionFont{
			padding-left:5px;
			color:#333;
		}
		<%--选项A--%>
		.optionA{
			color:black;
			text-decoration:none;
			padding-left:5px;
			font-size:14px;
		}
		.optionA:hover{
			color:#09F;
		}
		<%--立即播放A--%>
		.playA{
			color:white;
			text-decoration:none;
			background-color:#09F;
			padding-top:5px;
			padding-bottom:5px;
			padding-left:30px;
			padding-right:30px;
			font-size:20px;
		}
		.playA:hover{
			background-color:#08F;
		}
		<%--资源Div--%>
		.sourceDiv{
			width:300px; 
			padding-top:5px;
		}
		<%--资源Div 资源Ul--%>
		.sourceDiv .sourceUl{
			width:300px;
			border:1px solid #DDD;
			position:absolute;
			background-color:white;
			list-style-type:none;
		}
		<%--资源Div 资源Li--%>
		.sourceDiv .sourceLi{
			line-height:30px;
			cursor:pointer;
		}
		<%--资源Div 资源选择Li--%>
		.sourceDiv .sourceSelectLi{
			line-height:30px;
			cursor:pointer;
		}
		.sourceDiv .sourceSelectLi:hover{
			background-color:#EEE;
		}
		<%--资源Div 图片Div--%>
		.sourceDiv .imageDiv{
			width:20px;
			height:20px;
			background-repeat:no-repeat;
			background-image:url(/image/system/sourceTypeLogo.png);
		}
		<%--蓝色A--%>
		.blueA{
			color:#09F;
			text-decoration:none;
			padding-left:5px;
			font-size:14px;
		}
		<%--资源有问题--%>
		.sourceErrorA{
			color:#AAA;
			font-size:12px;
			text-decoration:none;
		}
		.sourceErrorA:hover{
			color:#09F;
		}
		
		<%--播放前信息 背景Div--%>
		.playAfterInfoBackgroundDiv{
			position:fixed;
			filter:alpha(opacity=15);	<%--IE6及以后版本设置透明度--%>
			-moz-opacity:0.15;			<%--Firefox3.5以前版本设置透明度--%>
			opacity:0.15;				<%--Firefox3.5以后版本设置透明度--%>
			width:100%;
			height:100%;
			background-color:black;
		}
		<%--播放前信息 Div--%>
		.playAfterInfoDiv{
			position:fixed;
			width:320px;
			background-color:white;
			border:1px solid #999;
		}
		<%--播放前信息 标题 行Div--%>
		.playAfterInfoRowDiv1{
			background-color:#F5F5F5;
			border-bottom:1px solid #DDD;
			cursor:move;
		}
		<%--播放前信息 标题 子Font--%>
		.playAfterInfoSubFont1{
			margin-left:20px;
			font-weight:bold;
			font-size:16px;
			line-height:40px;
		}
		<%--播放前信息 标题 Img--%>
		.playAfterInfoCloseImg{
			padding:12px;
			width:17px;
			position:absolute;
			right:0px;
			top:0px;
			cursor:pointer;
		}
		<%--播放前信息 内容 行Div--%>
		.playAfterInfoRowDiv2{
			margin-top:10px;
			margin-left:20px;
			width:280px;
		}
		<%--播放前信息 内容 子Font--%>
		.playAfterInfoSubFont2{
			color:#999999;
			font-size:12px;
			line-height:20px;
		}
		<%--播放前信息 内容 行Div--%>
		.playAfterInfoRowDiv3{
			margin-top:10px;
			margin-left:20px;
			width:280px;
		}
		<%--播放前信息 内容 子Font--%>
		.playAfterInfoSubFont3{
			color:#999999;
			font-size:16px;
			line-height:20px;
		}
		<%--播放前信息 已知消息 行Div--%>
		.playAfterInfoRowDiv4{
			margin-top:20px;
			background-color:#F5F5F5;
			border-top:1px solid #DDD;
			text-align:center;
		}
		<%--播放前信息 已知消息 A--%>
		.playAfterInfoSubmitA{
			padding-top:5px;
			padding-bottom:5px;
			padding-left:10px;
			padding-right:10px;
			font-size:14px;
			border:1px solid #DDD;
			color:black;
			line-height:60px;
			text-decoration:none;
		}
		.playAfterInfoSubmitA:hover{
			background-color:#E6E6E6;
		}
	</style>
</head>

<body>
<jsp:include page="/include/pageTop" flush="true"/>
<%--背景渐变模块--%>
<div class="rowDiv" style="background-image:url(/image/system/backgroundChange.png); height:40px;"></div>
<div style="margin-top:10px; padding-top:10px; padding-bottom:10px;">
	<div class="standardDiv">
		<div style="width:1000px; border:1px solid #EEE; background-color:white; padding-bottom:30px;">
			<div>
				<div style="width:204px; position:relative; left:30px; top:-30px;">
					<div style="width:204px; border:1px solid #EEE; ">
						<div style="width:202px; border:1px solid #DDD;">
							<div style="width:200px; border:1px solid #CCC;">
								<div style="width:200px; height:266px; overflow:hidden;">
									<img
										<c:choose>  
											<c:when test="${movie.logoPath == ''}">
												src="/image/system/defaultMovieLogo.png"
											</c:when>
											<c:otherwise> 
												src="${movie.logoPath}"
											</c:otherwise>
										</c:choose>
									style="border:0px; width:200px;"/>
								</div>
							</div>
						</div>
					</div>
					<%--百度分享--%>
					<div style="margin-left:10px;">
						<div class="bdsharebuttonbox"><A class=bds_more href="#" data-cmd="more"></A><A class=bds_qzone title=分享到QQ空间 href="#" data-cmd="qzone"></A><A class=bds_tsina title=分享到新浪微博 href="#" data-cmd="tsina"></A><A class=bds_tqq title=分享到腾讯微博 href="#" data-cmd="tqq"></A><A class=bds_renren title=分享到人人网 href="#" data-cmd="renren"></A><A class=bds_weixin title=分享到微信 href="#" data-cmd="weixin"></A></div>
						<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
					</div>
				</div>
				<div style="margin-left:60px; width:720px;">
					<div style="margin-top:20px; margin-bottom:10px;">
						<font style="font-size:25px;">${movie.name}</font>
						<c:if test="${movie.byname != ''}">
							&nbsp;
							<font style="font-size:14px; color:#AAA;">（${movie.byname}）</font>
						</c:if>
					</div>
					<%--如果存在导演--%>
					<c:if test="${movie.directorId != 0}">
						<div style="margin-top:3px;">
							<font style="font-size:14px;">
								<font style="color:#AAA;">导演：</font>
								<A class="optionA" href="/movieList/d${movie.directorId}" title="点击查看 ${movie.directorName} 导演电影">${movie.directorName}</A>&nbsp;
							</font>
						</div>
					</c:if>
					<%--如果存在演员--%>
					<c:if test="${fn:length(movie.movieActorList) != 0}">
						<div style="margin-top:3px;">
							<font style="font-size:14px;">
								<font style="color:#AAA;">演员：</font>
								<c:forEach items="${movie.movieActorList}" var="aMovieActor"  varStatus="status">
									<c:if test="${status.index < 5}">
										<A class="optionA" href="/movieList/a${aMovieActor.actorId}" title="点击查看 ${aMovieActor.actorName} 参演电影">${aMovieActor.actorName}</A>&nbsp;
									</c:if>
								</c:forEach>
							</font>
						</div>
					</c:if>
					<%--如果存在类型--%>
					<c:if test="${fn:length(movie.movieTypeList) != 0}">
						<div style="margin-top:3px;">
							<font style="font-size:14px;">
								<font style="color:#AAA;">类型：</font>
								<c:forEach items="${movie.movieTypeList}" var="aMovieType">
									<A class="optionA" href="/movieList/t${aMovieType.typeId}" title="点击查看 ${aMovieType.typeName} 类型电影">${aMovieType.typeName}</A>&nbsp;
								</c:forEach>
							</font>
						</div>
					</c:if>
					<%--如果存在地区--%>
					<c:if test="${movie.areaId != 0}">
						<div style="margin-top:3px;">
							<font style="font-size:14px;">
								<font style="color:#AAA;">地区：</font>
								<font class="optionFont">${movie.areaName}</font>
							</font>
						</div>
					</c:if>
					<%--如果存在上映时间--%>
					<c:if test="${movie.releaseDate != null}">
						<div style="margin-top:3px;">
							<font style="font-size:14px;">
								<font style="color:#AAA;">上映：</font>
								<font class="optionFont">${movie.releaseDate}</font>
							</font>
						</div>
					</c:if>
					
					<%--立即播放--%>
					<div style="margin-top:20px;">
						<c:choose>
							<%--如果存在播放资源--%>
							<c:when test="${fn:length(movie.movieSourceList) > 0}">
								<div style="width:180px; padding-top:5px;">
									<A class="playA" href="javascript:clickPlay()">
										立即播放
									</A>
								</div>
								<div style="width:50px; padding-top:12px;">
									<font style="color:#AAA">播放源:</font>
								</div>
								<%--资源列表--%>
								<div class="sourceDiv">
									<ul class="sourceUl">
										<c:forEach items="${movie.movieSourceList}"  varStatus="status" var="aMovieSource">
											<li id="sourceLi_${status.index}" class="sourceLi"
												style="<c:if test="${status.index !=0}">display:none;</c:if> float:left;"
												onclick="clickDownList(${status.index})"
											>
												<%--资源类型图标--%>
												<div style="width:25px; padding-top:5px; padding-left:10px;">
													<div class="imageDiv" style="background-position:0px ${aMovieSource.typeLogoPositionY};"></div>
												</div>
												<%--资源类型名称--%>
												<div style="width:80px;">
													<font style="color:#666;">${aMovieSource.typeName}</font>
												</div>
												<div style="width:160px;">
													<%--资源语言--%>
													<c:if test="${aMovieSource.languageId != 0}">
														<font style="color:#666; font-size:12px;">${aMovieSource.languageName}</font>&nbsp;
													</c:if>
													<%--资源字幕--%>
													<c:if test="${aMovieSource.subtitleId != 0}">
														<font style="color:#666; font-size:12px;">${aMovieSource.subtitleName}</font>&nbsp;
													</c:if>
													<%--资源状况--%>
													<c:if test="${aMovieSource.modeId != 0}">
														<font style="
															<c:choose>
																<c:when test="${aMovieSource.modeId == 1}">
																	background-color:#42B83F;
																</c:when>
																<c:otherwise>
																	background-color:#FC7032;
																</c:otherwise>
															</c:choose>
														color:white; font-size:10px; padding-left:5px; padding-right:5px;">
															${aMovieSource.modeName}
														</font>&nbsp;
													</c:if>
													<%--资源广告时长--%>
													<c:choose>
														<c:when test="${aMovieSource.typeAdDuration == 0}">
															<font style="color:#42B83F; font-size:12px;">无广告</font>
														</c:when>
														<c:otherwise>
															<font style="color:#666; font-size:12px;">
																<font style="color:#FC7032;">${aMovieSource.typeAdDuration}</font>秒广告
															</font>
														</c:otherwise>
													</c:choose>
												</div>
												<%--资源选择状态--%>
												<div style="width:20px; padding-top:5px; padding-right:5px;">
													<img id="sourceDownImg_${status.index}" src="/image/system/sourceDown.png" style="width:18px; <c:if test="${status.index !=0}">display:none;</c:if>"/>
													<img id="sourceCheckImg_${status.index}" src="/image/system/sourceCheck.png" style="width:18px; display:none"/>
													<input id="sourceTypeId_${status.index}" type="hidden" value="${aMovieSource.typeId}"/>
													<input id="sourceTypeName_${status.index}" type="hidden" value="${aMovieSource.typeName}"/>
													<input id="sourceUrl_${status.index}" type="hidden" value="${aMovieSource.url}"/>
												</div>
											</li>
										</c:forEach>
									</ul>
									<input id="sourceCount" type="hidden" value="${fn:length(movie.movieSourceList)}"/>
									<input id="sourceSelectNo" type="hidden" value="0"/>
								</div>
								<div style="margin-left:310px; width:100px; padding-top:9px;">
									<A href="javascript:clickSourceError()" class="sourceErrorA">资源有问题？</A>
								</div>
								
							</c:when>
							<%--如果不存在播放资源--%>
							<c:otherwise>
								<font style="color:#999; font-size:18px;">暂无资源</font>
							</c:otherwise>
						</c:choose>
					</div>
				</div>
			</div>
			<div>
				<div style="width:640px; margin-left:30px;">
					<div style="border-bottom:1px solid #09F;">
						<font style="color:#09F; font-size:16px; font-weight:bold; margin-left:10px; line-height:30px;">剧情描述</font>
					</div>
					<div style="border-bottom:1px solid #09F; padding-top:20px;">
						<%--本电影有无简介判断--%>
						<c:choose>
							<c:when test="${movie.summary==''}">
								<div style="line-height:30px; font-size:14px; color:#666; text-indent:2em; margin-bottom:20px;">
									暂无描述
								</div>
							</c:when>
							<c:otherwise>
								<% request.setAttribute("vEnter","\n"); %>
								<c:set var="summaryList" value="${fn:split(movie.summary,vEnter)}" />
								<c:forEach items="${summaryList}" var="aSummary">
									<div style="line-height:30px; font-size:14px; color:#666; text-indent:2em; margin-bottom:20px;">
										${aSummary}
									</div>
								</c:forEach>
							</c:otherwise>
						</c:choose>
					</div>
					<div align="right">
						<%--本电影有百科地址的话--%>
						<c:if test="${movie.baikeUrl != ''}">
							<A class="blueA" href="${movie.baikeUrl}" target="_blank" title="${movie.baikeUrl}">
								百科地址：
								${fn:substring(movie.baikeUrl,0,50)}
								<c:if test="${fn:length(movie.baikeUrl) > 50}">..</c:if>
								&nbsp;
							</A>
						</c:if>
					</div>
				</div>
				<div style="width:270px; margin-left:20px; padding-left:20px; border-left:1px solid #CCC;">
					<div style="margin-bottom:30px;">
						<%--橘黄色的小模块--%>
						<div style="width:6px; height:15px; margin-top:8px; background-color:#F26522;">&nbsp;</div>
						<font style="color:#666; font-size:16px; font-weight:bold; margin-left:10px; line-height:30px;">演员列表</font>
					</div>
					<div>
						<%--本电影有无演员判断--%>
						<c:choose>
							<c:when test="${fn:length(movie.movieActorList) == 0}">
								<div style="line-height:30px; font-size:14px; color:#666; text-indent:2em; margin-bottom:20px;">
									暂无演员
								</div>
							</c:when>
							<c:otherwise>
								<c:forEach items="${movie.movieActorList}" var="aMovieActor"  varStatus="status">
									<div style="width:80px; height:170px; margin-right:10px;">
										<%--带边框的海报图片--%>
										<A href="${aMovieActor.actorBaikeUrl}" target="_blank" title="点击查看 ${aMovieActor.actorName} 的资料">
											<div style="width:78px; border:1px solid #EEE;">
												<div style="width:76px; border:1px solid #DDD;">
													<div style="width:74px; border:1px solid #CCC; height:85px; overflow:hidden;">
														<img 
															<c:choose>
																<c:when test="${aMovieActor.actorLogoPath == ''}">
																	src="/image/system/defaultActorLogo.png"
																</c:when>
																<c:otherwise>
																	src="${aMovieActor.actorLogoPath}"
																</c:otherwise>
															</c:choose>
														style="border:0px; width:74px;"/>
													</div>
												</div>
											</div>
										</A>
										<div style="height:18px;" align="center">
											<c:if test="${aMovieActor.actorXlwbUrl != ''}">
												<A href="${aMovieActor.actorXlwbUrl}" target="_blank" title="Ta的新浪微博">
													<img src="/image/system/xlwbLogo.png" style="border:0px; width:15px;" />
												</A>
											</c:if>
											<c:if test="${aMovieActor.actorTxwbUrl != ''}">
												<A href="${aMovieActor.actorTxwbUrl}" target="_blank" title="Ta的腾讯微博">
													<img src="/image/system/txwbLogo.png" style="border:0px; width:15px;" />
												</A>
											</c:if>
											<c:if test="${aMovieActor.actorBdtbUrl != ''}">
												<A href="${aMovieActor.actorBdtbUrl}" target="_blank" title="Ta的百度贴吧">
													<img src="/image/system/bdtbLogo.png" style="border:0px; width:15px;" />
												</A>
											</c:if>
										</div>
										<div>
											<A href="/movieList/a${aMovieActor.actorId}">
												<div align="center">
													<font style="font-size:14px; color:#09F;" title="点击查看 ${aMovieActor.actorName} 参演电影">
														<%--最大长度为5--%>
														<c:choose>
															<c:when test="${fn:length(aMovieActor.actorName) > 5}">
																${fn:substring(aMovieActor.actorName,0,4)}..
															</c:when>
															<c:otherwise>
																${aMovieActor.actorName}
															</c:otherwise>
														</c:choose>
													</font>
												</div>
												<div align="center">
													<font style="font-size:12px; color:#999;" title="饰&nbsp;${aMovieActor.roleName}">
														饰&nbsp;
														<%--最大长度为4--%>
														<c:choose>
															<c:when test="${fn:length(aMovieActor.roleName) > 4}">
																${fn:substring(aMovieActor.roleName,0,3)}..
															</c:when>
															<c:otherwise>
																${aMovieActor.roleName}
															</c:otherwise>
														</c:choose>
													</font>
												</div>
											</A>
										</div>
									</div>
								</c:forEach>
							</c:otherwise>
						</c:choose>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/include/pageBottom" flush="true"/>
</body>
<script type="text/javascript">
	var isSelect = false;
	<%--点击下拉列表--%>
	function clickDownList(no){
		var sourceSelectNo = parseInt($("#sourceSelectNo").val());
		var sourceCount = parseInt($("#sourceCount").val());
		
		<%--如果当前显示下俩列表 那就让它不显示--%>
		if(isSelect){
			isSelect = false;
			$("#sourceSelectNo").val(no);
			$("#sourceCheckImg_"+sourceSelectNo).css("display","none");
			for(var i = 0 ; i < sourceCount ; i++){
				if(i != no){
					$("#sourceLi_"+i).css("display","none");
					$("#sourceDownImg_"+i).css("display","none");
					$("#sourceCheckImg_"+i).css("display","none");
				}
				else{
					$("#sourceLi_"+i).css("display","block");
					$("#sourceDownImg_"+i).css("display","block");
				}
				$("#sourceLi_"+i).attr("class","sourceLi");
			}
		}
		<%--如果当前不显示下俩列表 那就让它显示--%>
		else{
			isSelect = true;
			$("#sourceDownImg_"+sourceSelectNo).css("display","none");
			$("#sourceCheckImg_"+sourceSelectNo).css("display","block");
			for(var i = 0 ; i < sourceCount ; i++){
				$("#sourceLi_"+i).css("display","block");
				$("#sourceLi_"+i).attr("class","sourceSelectLi");
			}
		}
	}
	
	<%--点击立即播放--%>
	function clickPlay(){
		var sourceSelectNo = parseInt($("#sourceSelectNo").val());
		var sourceTypeId = $("#sourceTypeId_"+sourceSelectNo).val();
		
		var sourceUrl = $("#sourceUrl_"+sourceSelectNo).val();
		window.open(sourceUrl);
	}
	
	<%--点击资源有问题--%>
	function clickSourceError(){
		var sourceSelectNo = parseInt($("#sourceSelectNo").val());
		var sourceTypeName = $("#sourceTypeName_"+sourceSelectNo).val();
		<%--调用 意见反馈--%>
		clickfeedBack("\""+sourceTypeName+"\"的播放源有下列问题:\n");
	}
</script>
</html>
